<!DOCTYPE html>
<html>
<head>
	<s3:data name='CollDatas.headerScript' />
	<s3:import type="css"></s3:import>
    
    <link rel="stylesheet" href="${data:dependencies.cmp}/css/cmp-listView.css${data:buildversion}">
    <link rel="stylesheet" href="${data:dependencies.cmp}/css/cmp-tab.css${data:buildversion}">
    <link rel="stylesheet" href="${data:dependencies.cmp}/css/cmp-list-card.css${data:buildversion}">
    <title id="title"></title>
    <style>
        .cmp-tab-content {
            display: none;
        }
        .cmp-tab-content.selected {
            display: block;
        }
        .c1 div{
            color : #666;
        }
        .c1.selected div{
            color : #000;
        }
        .cmp-tab-doState .li.selected {
            border-bottom: none;
        }
        .cmp-tab-doState .li.selected:after {
            content: ' ';
            position: absolute;
            width: 30px;
            height: 3px;
            left: 42%;
            background: #3aadfb;
            border-radius: 3px;
            top: 36px;
        }
        .cmp-tab-doState .title{
            font-size: 16px;
        }
        .cmp-tab-doState:after{
            height: 0;
        }
        .cmp-tab-doState .li{
            padding: 10px 0 9px 0;
        }
    </style>
</head>
<body>
<div class="cmp-content cmp-content-none position_relative ">
    <ul class="cmp-tab-doState">
        <li id="tab1" class="li c1 selected" list-type="joined" isInit ="true">
            <div class="title"><i18n key="inquiry.h5.joined"></i18n></div>
        </li>
        <li id="tab2" class="li c1" list-type="started" isInit ="true">
            <div class="title"><i18n key="inquiry.h5.started"></i18n></div>
        </li>
    </ul>
    <div class="cmp-tab-content selected">
        <div class="cmp-control-content cmp-active">
            <div id="all_inq" class="cmp-scroll-wrapper">
                <div class="cmp-scroll">
                    <div class="news_content" id="bul_listAll">
                        <ul class="cmp-table-view cmp-table-view-striped cmp-table-view-condensed" id="bul_list">
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="cmp-tab-content">
        <div class="cmp-control-content cmp-active">
            <div id="startedListDiv" class="cmp-scroll-wrapper">
                <div class="cmp-scroll">
                    <div class="news_content" id="startedList">
                        <ul class="cmp-table-view cmp-table-view-striped cmp-table-view-condensed" id="startedListUl">
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="bul_list_li">
    <% var list = this.list; %>
    <% var listType = this.listType; %>
    <% for(var i = 0,len = list.length;i < len; i++){ %>
    <% var obj = list[i]; %>
    <li class="cmp-table-view-cell list-cell text-wrap" inquiryId="<%=obj.id %>">
        <div class="list-left">
            <div class="list-img">
                 <img class="cmp-img-cache" cmp-data="<%=obj.createUserId %>">
            </div>
            <div class="list-createUserName">
                <span><%=escapeStringToHTML(obj.createUserName) %></span>
            </div>
        </div>
        <div class="list-right">
            <div class="list-surveyName cmp-ellipsis-2">
                <span><%=escapeStringToHTML(obj.surveyName)%></span>
            </div>
            <div class="list-middle">
                <div class="list-date">
                    <span><%=obj.dateFormat%></span>
                    <% if(obj.hasAtt){ %>
                    <span class="cmp-icon see-icon-accessory" style="margin-left:1em;"></span>
                    <% } %>
                </div>
            </div>
            <div class="list-bottom">
                <div class="list-per">
                    <span><%=escapeStringToHTML(obj.per) %></span>
                </div>
            </div>
        </div>
        <div style="clear: both;"></div>
        <% if(obj.surveyState=='3' && listType == 'started'){ %>
        <!--草稿-->
        <span class="mark m3-icon-status-seal end"><em><%=cmp.i18n("inquiry.h5.liststate1") %></i18n></em></span>
        <% } %>
        <% if(obj.surveyState=='8'&& obj.myState && false && listType == 'joined'){ %>
        <!--已填 暂不显示-->
        <span class="mark m3-icon-status-seal determined"><em><%=cmp.i18n("inquiry.h5.liststate2") %></em></span>
        <% } %>
        <% if(obj.surveyState=='8'&& !obj.myState && listType == 'joined'){ %>
        <!--未填-->
        <span class="mark m3-icon-status-seal" style="color: #FFB11A"><em><%=cmp.i18n("inquiry.h5.liststate3") %></em></span>
        <% } %>
        <% if(obj.surveyState=='4' && listType == 'started'){ %>
        <!--待审核-->
        <span class="mark m3-icon-status-seal stag"><em><%=cmp.i18n("inquiry.h5.liststate4") %></em></span>
        <% } %>
        <% if(obj.surveyState=='2' && listType == 'started'){ %>
        <!--通过-->
        <span class="mark m3-icon-status-seal" style="color: #48D59A"><em><%=cmp.i18n("inquiry.h5.liststate5") %></em></span>
        <% } %>
        <% if(obj.surveyState=='1' && listType == 'started'){ %>
        <!--不通过-->
        <span class="mark m3-icon-status-seal" style="color: #F86363"><em><%=cmp.i18n("inquiry.h5.liststate6") %></em></span>
        <% } %>
    </li>
    <% } %>
</script>
<script src="${data:dependencies.inquiry}/i18n/Inquiry_zh_CN.js${data:buildversion}"></script>
<script src="${data:dependencies.cmp}/js/cmp-i18n.js${data:buildversion}"></script>
<script type="text/javascript">
	cmp.i18n.init("${data:dependencies.inquiry}/i18n/","Inquiry",null,"${data:buildversion}");
    var str = cmp.i18n("inquiry.h5.inquiry");
    document.getElementById("title").innerHTML = str;
</script>
 <s3:data name='cordova' />                
<s3:data name='CollDatas.footerScript' />
<s3:import type="js"></s3:import>
<script src="${data:dependencies.cmp}/js/cmp-imgCache.js${data:buildversion}"></script>
<script src="${data:dependencies.cmp}/js/cmp-listView.js${data:buildversion}"></script>
<script src="${data:dependencies.cmp}/js/cmp-tabChange.js${data:buildversion}"></script>
<script src="<s3:data name='dependencies.inquiry'/>/js/inquiryIndex.js${data:buildversion}"></script>
</body>
</html>
